<template>
  <van-cell center :title="title" :label="label">
    <!-- 使用 right-icon 插槽来自定义右侧图标 -->
    <template #right-icon>
      <van-icon @click="fn" name="play-circle-o" size="25" />
    </template>
  </van-cell>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true
    },
    label: {
      type: String,
      required: true
    },
    id: {
      type: [String, Number],
      required: true
    }
  },
  methods: {
    fn () {
      // 跳转到播放页，并且携带id作为参数
      // 跳转加r，取值不加
      this.$router.push({
        name: 'play',
        query: {
          id: this.id
        }
      })
    }
  }
}
</script>

<style></style>
